import { createVuePlugin } from 'vite-plugin-vue2'
import { resolve } from 'path'

export default {
  resolve: {
    alias:[
      {
        find: '@',
        replacement: resolve(__dirname, 'src')
      },
      {
        find: 'views',
        replacement: resolve(__dirname, 'src/views')
      },
      {
        find: 'comp',
        replacement: resolve(__dirname, 'src/components')
      },
      // 解决element-ui table不显示的问题
      {
        find: 'vue',
        replacement: 'vue/dist/vue.esm.js'
      }
    ]
  },
  plugins: [createVuePlugin()],
  build: {
    minify: 'terser',
    terserOptions: {
      compress: {
        drop_console: true,
        drop_debugger: true
      }
    }
  }
}